package cn.jsc.pet.service;

import cn.jsc.basic.service.IBaseService;
import cn.jsc.basic.util.PageList;
import cn.jsc.pet.domain.Pet;
import cn.jsc.pet.domain.SearchMasterMsg;
import cn.jsc.pet.query.SearchMasterMsgQuery;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public interface ISearchMasterMsgService extends IBaseService<SearchMasterMsg> {

    List<SearchMasterMsg> getAll();

    /**
     * 发布寻主
     * @param searchMasterMsg
     * @param request
     */
    void publish(SearchMasterMsg searchMasterMsg, HttpServletRequest request);

    /**
     * 管理员查询待处理消息
     * @param query
     * @param request
     * @return
     */
    PageList<SearchMasterMsg> pending(SearchMasterMsgQuery query, HttpServletRequest request);
    /**
     * 管理员查询已处理消息
     * @param query
     * @param request
     * @return
     */
    PageList<SearchMasterMsg> processed(SearchMasterMsgQuery query, HttpServletRequest request);
    /**
     * 获取用户的寻主消息
     * @param query
     * @param request
     * @return
     */
    PageList<SearchMasterMsg> userMsg(SearchMasterMsgQuery query, HttpServletRequest request);

    /**
     * 处理宠物寻主的信息
     * @param pet
     */
    void handle(Pet pet);
}
